<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OsinfoFilter: Libosinfo Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Libosinfo Reference Manual">
<link rel="up" href="ch01.html" title="Libosinfo">
<link rel="prev" href="Libosinfo-osinfo-enum-types.html" title="osinfo_enum_types">
<link rel="next" href="OsinfoInstallConfig.html" title="OsinfoInstallConfig">
<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#OsinfoFilter.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#OsinfoFilter.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="Libosinfo-osinfo-enum-types.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="OsinfoInstallConfig.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="OsinfoFilter"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="OsinfoFilter.top_of_page"></a>OsinfoFilter</span></h2>
<p>OsinfoFilter — An entity filter</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="OsinfoFilter.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="OsinfoFilter.html" title="OsinfoFilter"><span class="returnvalue">OsinfoFilter</span></a> *
</td>
<td class="function_name">
<a class="link" href="OsinfoFilter.html#osinfo-filter-new" title="osinfo_filter_new ()">osinfo_filter_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="OsinfoFilter.html#osinfo-filter-add-constraint" title="osinfo_filter_add_constraint ()">osinfo_filter_add_constraint</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="OsinfoFilter.html#osinfo-filter-clear-constraint" title="osinfo_filter_clear_constraint ()">osinfo_filter_clear_constraint</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="OsinfoFilter.html#osinfo-filter-clear-constraints" title="osinfo_filter_clear_constraints ()">osinfo_filter_clear_constraints</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
</td>
<td class="function_name">
<a class="link" href="OsinfoFilter.html#osinfo-filter-get-constraint-keys" title="osinfo_filter_get_constraint_keys ()">osinfo_filter_get_constraint_keys</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
</td>
<td class="function_name">
<a class="link" href="OsinfoFilter.html#osinfo-filter-get-constraint-values" title="osinfo_filter_get_constraint_values ()">osinfo_filter_get_constraint_values</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="OsinfoFilter.html#osinfo-filter-matches" title="osinfo_filter_matches ()">osinfo_filter_matches</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="OsinfoFilter.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> OsinfoFilter
        <span class="lineart">├──</span> <a class="link" href="OsinfoDeviceLinkFilter.html" title="OsinfoDeviceLinkFilter">OsinfoDeviceLinkFilter</a>
        <span class="lineart">╰──</span> <a class="link" href="OsinfoProductFilter.html" title="OsinfoProductFilter">OsinfoProductFilter</a>
</pre>
</div>
<div class="refsect1">
<a name="OsinfoFilter.description"></a><h2>Description</h2>
<p><a class="link" href="OsinfoFilter.html" title="OsinfoFilter"><span class="type">OsinfoFilter</span></a> provides a way to filter OsinfoEntity
instances based on their parameter values.</p>
</div>
<div class="refsect1">
<a name="OsinfoFilter.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="osinfo-filter-new"></a><h3>osinfo_filter_new ()</h3>
<pre class="programlisting"><a class="link" href="OsinfoFilter.html" title="OsinfoFilter"><span class="returnvalue">OsinfoFilter</span></a> *
osinfo_filter_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Construct a new filter that matches all entities</p>
<div class="refsect3">
<a name="osinfo-filter-new.returns"></a><h4>Returns</h4>
<p>a filter object. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-filter-add-constraint"></a><h3>osinfo_filter_add_constraint ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
osinfo_filter_add_constraint (<em class="parameter"><code><a class="link" href="OsinfoFilter.html" title="OsinfoFilter"><span class="type">OsinfoFilter</span></a> *filter</code></em>,
                              <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *propName</code></em>,
                              <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *propVal</code></em>);</pre>
<p>Adds a constraint that requires the entity to have
a property key <em class="parameter"><code>propName</code></em>
 with a value of <em class="parameter"><code>propVal</code></em>
.
If multiple constraints are added for the same
<em class="parameter"><code>propName</code></em>
, with different values, the entity have
all property values.</p>
<div class="refsect3">
<a name="osinfo-filter-add-constraint.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filter</p></td>
<td class="parameter_description"><p>a filter object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>propName</p></td>
<td class="parameter_description"><p>the name of the parameter key</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>propVal</p></td>
<td class="parameter_description"><p>the required property value</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-filter-clear-constraint"></a><h3>osinfo_filter_clear_constraint ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
osinfo_filter_clear_constraint (<em class="parameter"><code><a class="link" href="OsinfoFilter.html" title="OsinfoFilter"><span class="type">OsinfoFilter</span></a> *filter</code></em>,
                                <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *propName</code></em>);</pre>
<p>Remove all filter constraints for the matching property
name.</p>
<div class="refsect3">
<a name="osinfo-filter-clear-constraint.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filter</p></td>
<td class="parameter_description"><p>a filter object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>propName</p></td>
<td class="parameter_description"><p>name of the key to remove constraints for</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-filter-clear-constraints"></a><h3>osinfo_filter_clear_constraints ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
osinfo_filter_clear_constraints (<em class="parameter"><code><a class="link" href="OsinfoFilter.html" title="OsinfoFilter"><span class="type">OsinfoFilter</span></a> *filter</code></em>);</pre>
<p>Remove all filter property constraints</p>
<div class="refsect3">
<a name="osinfo-filter-clear-constraints.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>filter</p></td>
<td class="parameter_description"><p>a filter object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-filter-get-constraint-keys"></a><h3>osinfo_filter_get_constraint_keys ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
osinfo_filter_get_constraint_keys (<em class="parameter"><code><a class="link" href="OsinfoFilter.html" title="OsinfoFilter"><span class="type">OsinfoFilter</span></a> *filter</code></em>);</pre>
<p>Get a list of all constraint property keys</p>
<div class="refsect3">
<a name="osinfo-filter-get-constraint-keys.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>filter</p></td>
<td class="parameter_description"><p>a filter object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="osinfo-filter-get-constraint-keys.returns"></a><h4>Returns</h4>
<p>List of constraint keys. </p>
<p><span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-filter-get-constraint-values"></a><h3>osinfo_filter_get_constraint_values ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
osinfo_filter_get_constraint_values (<em class="parameter"><code><a class="link" href="OsinfoFilter.html" title="OsinfoFilter"><span class="type">OsinfoFilter</span></a> *filter</code></em>,
                                     <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *propName</code></em>);</pre>
<p>Get a list values for filter constriants with the named key</p>
<div class="refsect3">
<a name="osinfo-filter-get-constraint-values.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filter</p></td>
<td class="parameter_description"><p>a filter object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>propName</p></td>
<td class="parameter_description"><p>the name of the key</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="osinfo-filter-get-constraint-values.returns"></a><h4>Returns</h4>
<p>List of constraint values. </p>
<p><span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-filter-matches"></a><h3>osinfo_filter_matches ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
osinfo_filter_matches (<em class="parameter"><code><a class="link" href="OsinfoFilter.html" title="OsinfoFilter"><span class="type">OsinfoFilter</span></a> *filter</code></em>,
                       <em class="parameter"><code><a class="link" href="OsinfoEntity.html" title="OsinfoEntity"><span class="type">OsinfoEntity</span></a> *entity</code></em>);</pre>
<p>Determine of an entity matches a filter</p>
<div class="refsect3">
<a name="osinfo-filter-matches.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filter</p></td>
<td class="parameter_description"><p>a filter object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>entity</p></td>
<td class="parameter_description"><p>an entity to query</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="osinfo-filter-matches.returns"></a><h4>Returns</h4>
<p> TRUE if entity passes the filter, FALSE otherwise</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="OsinfoFilter.other_details"></a><h2>Types and Values</h2>
</div>
<div class="refsect1">
<a name="OsinfoFilter.see-also"></a><h2>See Also</h2>
<p><a class="link" href="OsinfoEntity.html" title="OsinfoEntity"><span class="type">OsinfoEntity</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.29</div>
</body>
</html>